package com.hrt.datasender.mq.model;

import java.util.Date;

/**
 * 
 * @author wencheng
 *
 */
public class OperInfoModel extends MqModel {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private Date time;

    private String msg;

    private String throwableMsg;

    private String ip;

    private String port;

    private int operInfoSize;

    private int operErrorInfoSzie;

    public OperInfoModel(String msg) {
        time = new Date();
        this.msg = msg;
    }

    public OperInfoModel(String msg,String throwableMsg) {
        time = new Date();
        this.msg = msg;
        this.throwableMsg = throwableMsg;
    }

    public OperInfoModel(String msg,String ip,String port) {
        time = new Date();
        this.msg = msg;
        this.ip = ip;
        this.port = port;
    }

    @Override
    public int getMqModelType() {
        return MqModel.MODEL_TYPE_DRIVE;
    }

    @Override
    public String toString() {
        return "OperInfoModel{time=" + time + ", msg='" + msg + '\'' + '}';
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getMsg() {
        return msg;
    }

    public String getThrowableMsg() {
        return throwableMsg;
    }

    public void setThrowableMsg(String throwableMsg) {
        this.throwableMsg = throwableMsg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public int getOperInfoSize() {
        return operInfoSize;
    }

    public void setOperInfoSize(int operInfoSize) {
        this.operInfoSize = operInfoSize;
    }

    public int getOperErrorInfoSzie() {
        return operErrorInfoSzie;
    }

    public void setOperErrorInfoSzie(int operErrorInfoSzie) {
        this.operErrorInfoSzie = operErrorInfoSzie;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

}
